package omg.loot;


public class Tile{
   public static final float size = 32;
   public static final float r = size*0.5f;
   public static final int LAND = -1;
   public static final int WATER = -16776986;
   public static final int SWAMP = 2;
   public static final int START = 100;
   public static final int END = -100;

   protected Entity entities[];
   protected Tile[] parent = new Tile[4];
   protected short parentIndex = 0;
   protected int totalCost = Integer.MAX_VALUE;
   protected int stepCost=1;
   protected int distance=Integer.MAX_VALUE;
   protected int type;
   protected short x, y;

   public Tile(){}

   public Tile(final short x, final short y){
      this.x = x;
      this.y = y;
      this.type = LAND;
   }

   public Tile(final int x, final int y){
      this.x = (short)x;
      this.y = (short)y;
      this.type = LAND;
   }

   public Tile(final Tile t){
      this.entities = t.entities;
      this.parent = t.parent;
      this.totalCost=t.totalCost;
      this.stepCost=t.stepCost;
      this.distance=t.distance;
      this.parentIndex=t.parentIndex;
      this.type=t.type;
      this.x=t.x;
      this.y=t.y;
   }

   @Override
   public String toString(){
      return x+", "+y;
   }
}